{include file="index/header"}
<body>
<div class="fly-panel fly-panel-user">
  <div class="tpt-admin">
    <fieldset class="layui-elem-field layui-field-title">
      <legend>修改采集器</legend>
    </fieldset>
    <form class="layui-form">
      <input type="hidden" name="id" value="{$Robotlanlan.id}">
      <!-- 采集器名称 -->
      <div class="layui-form-item">
        <label class="layui-form-label">采集器名称</label>
        <div class="layui-input-block">
          <input type="text" name="name" value="{$Robotlanlan.name}" required lay-verify="required" placeholder="必填内容" autocomplete="off" class="layui-input">
        </div>
      </div>
       <!-- 入库分类 -->
      <div class="layui-form-item" style="width: 300px;">
        <label class="layui-form-label">入库分类</label> 
        <div class="layui-input-block">
          <select name="cid">
          {volist name="CategoryList" id="vo"}
            <option {if condition="$Robotlanlan['cid'] eq $vo['id']"}selected="selected"{/if} value="{$vo.id}">{$vo.name}</option>
          {/volist}
          </select>
        </div>
      </div>
      <!-- 采集分类 -->
      <div class="layui-form-item" style="width: 300px;">
        <label class="layui-form-label">采集分类</label>
        <div class="layui-input-block">
            <select name="catIds">
              <option {if condition="$Robotlanlan['catIds'] eq '193'"}selected="selected"{/if} value="193">女装</option>
              <option {if condition="$Robotlanlan['catIds'] eq '195'"}selected="selected"{/if} value="195">男装</option>
              <option {if condition="$Robotlanlan['catIds'] eq '196'"}selected="selected"{/if} value="196">鞋包</option>
              <option {if condition="$Robotlanlan['catIds'] eq '197'"}selected="selected"{/if} value="197">饰品</option>
              <option {if condition="$Robotlanlan['catIds'] eq '198'"}selected="selected"{/if} value="198">手机数码</option>
              <option {if condition="$Robotlanlan['catIds'] eq '199'"}selected="selected"{/if} value="199">美妆</option>
              <option {if condition="$Robotlanlan['catIds'] eq '202'"}selected="selected"{/if} value="202">美食</option>
              <option {if condition="$Robotlanlan['catIds'] eq '205'"}selected="selected"{/if} value="205">母婴用品</option>
              <option {if condition="$Robotlanlan['catIds'] eq '206'"}selected="selected"{/if} value="206">百货</option>
              <option {if condition="$Robotlanlan['catIds'] eq '307'"}selected="selected"{/if} value="307">内衣</option>
              <option {if condition="$Robotlanlan['catIds'] eq '313'"}selected="selected"{/if} value="313">其它</option>  
            </select>
        </div>
      </div>
      <!-- 排序方式 -->
      <div class="layui-form-item" style="width: 300px;">
        <label class="layui-form-label">排序方式</label>
        <div class="layui-input-block">
            <select name="sort">
              <option {if condition="$Robotlanlan['sort'] eq '17'"}selected="selected"{/if} value="17">综合排序</option>
              <option {if condition="$Robotlanlan['sort'] eq '1'"}selected="selected"{/if} value="1">最新</option>
              <option {if condition="$Robotlanlan['sort'] eq '3'"}selected="selected"{/if} value="3">价格从高到低</option>
              <option {if condition="$Robotlanlan['sort'] eq '15'"}selected="selected"{/if} value="15">2小时销量从高到低</option>
              <option {if condition="$Robotlanlan['sort'] eq '4'"}selected="selected"{/if} value="4">销量从高到低</option>
              <option {if condition="$Robotlanlan['sort'] eq '13'"}selected="selected"{/if} value="13">月销额从高到低</option>
              <option {if condition="$Robotlanlan['sort'] eq '5'"}selected="selected"{/if} value="5">佣金比从高到低</option>
              <option {if condition="$Robotlanlan['sort'] eq '9'"}selected="selected"{/if} value="9">佣金额从高到低</option>
              <option {if condition="$Robotlanlan['sort'] eq '8'"}selected="selected"{/if} value="8">折扣力度</option>
            </select>
        </div>
      </div> 
      <!-- 天猫 -->
      <div class="layui-form-item" style="width: 300px;">
        <label class="layui-form-label">天猫</label>
        <div class="layui-input-block">
            <select name="userType">
              <option {if condition="$Robotlanlan['userType'] eq 'all'"}selected="selected"{/if} value="all">不限</option>
              <option {if condition="$Robotlanlan['userType'] eq 'tmall'"}selected="selected"{/if} value="tmall">天猫</option>
            </select>
        </div>
      </div>         
      <!-- 价格限制 -->
      <div class="layui-form-item">
        <div class="layui-inline">
          <label class="layui-form-label">价格</label>
          <div class="layui-input-inline" style="width: 150px;">
            <input type="text" name="startPrice" value="{$Robotlanlan.startPrice}" placeholder="￥" autocomplete="off" class="layui-input">
          </div>
          <div class="layui-form-mid"> - </div>
          <div class="layui-input-inline" style="width: 150px;">
            <input type="text" name="endPrice" value="{$Robotlanlan.endPrice}" placeholder="￥" autocomplete="off" class="layui-input">
          </div>          
        </div>
      </div>
      <!-- 优惠券额 -->
      <div class="layui-form-item">
        <div class="layui-inline">
          <label class="layui-form-label">优惠券额</label>
          <div class="layui-input-inline" style="width: 150px;">
            <input type="text" name="startCouponAmount" value="{$Robotlanlan.startCouponAmount}" autocomplete="off" class="layui-input">
          </div>
          <div class="layui-form-mid"> - </div>
          <div class="layui-input-inline" style="width: 150px;">
            <input type="text" name="endCouponAmount" value="{$Robotlanlan.endCouponAmount}" autocomplete="off" class="layui-input">
          </div>          
        </div>
      </div>        
      <!-- 佣金百分比限制 -->
      <div class="layui-form-item">
        <div class="layui-inline">
          <label class="layui-form-label">佣金百分比</label>
          <div class="layui-input-inline" style="width: 150px;">
            <input type="text" name="startTkRate" value="{$Robotlanlan.startTkRate}" autocomplete="off" class="layui-input">
          </div>
          <div class="layui-form-mid"> - </div>
          <div class="layui-input-inline" style="width: 150px;">
            <input type="text" name="endTkRate" value="{$Robotlanlan.endTkRate}" autocomplete="off" class="layui-input">
          </div>          
        </div>
      </div>
      <!-- 2小时月销量 -->
      <div class="layui-form-item">
        <label class="layui-form-label">2小时月销量</label>
        <div class="layui-input-block">
          <input type="text" name="startBiz30day" value="{$Robotlanlan.startBiz30day}" autocomplete="off" class="layui-input">
        </div>
      </div>
      <!-- 所属类型 -->
      <div class="layui-form-item">
        <label class="layui-form-label">所属类型</label>
        <div class="layui-input-block">
          <input type="radio" name="type" value="1" title="优惠卷" {if condition="$Robotlanlan['type'] eq 1"}checked=""{/if}>
          <input type="radio" name="type" value="2" title="不限" disabled="">
        </div>
      </div>
      <!-- 采集页数 -->
      <div class="layui-form-item">
        <label class="layui-form-label">采集页数</label>
        <div class="layui-input-block">
          <input type="text" name="page" value="{$Robotlanlan.page}" required lay-verify="required" placeholder="必填内容" autocomplete="off" class="layui-input">
        </div>
      </div>
      <div class="layui-form-item">
        <div class="layui-input-block">
    	  <button class="layui-btn" lay-submit="" lay-filter="robotlanlan_edit">立即提交</button> 
          <button class="layui-btn layui-btn-primary" onclick="history.go(-1)">返回</button>
        </div>
      </div>
    </form>
  </div>
</div>
{include file="index_footer"}
<script type="text/javascript">
layui.use(['form'],function(){
  var form = layui.form()
  ,jq = layui.jquery;

  form.on('submit(robotlanlan_edit)', function(data){
    loading = layer.load(2, {
      shade: [0.2,'#000']
    });
    var param = data.field;
    jq.post('{:url("robotlanlan/edit")}',param,function(data){
      if(data.code == 200){
        layer.close(loading);
        layer.msg(data.msg, {icon: 1, time: 1000}, function(){
          location.href = '{:url("robotlanlan/index")}';
        });
      }else{
        layer.close(loading);
        layer.msg(data.msg, {icon: 2, anim: 6, time: 1000});
      }
    });
    return false;
  });
})
</script>
</body>
</html>